Next | Prev | Up | Top | Contents | Index

Entry Point open()

A STREAMS driver (but not module) must export a pfxopen() entry point. The argument list for a STREAMS driver's open differs from that of a device driver. The prototype for a STREAMS pfxopen() entry point is:

int pfxopen(queue_t *q, dev_t *devp, int oflag, int sflag, cred_t *crp);

The argument values are

*q Pointer to the queue structure being opened.
*devp Pointer to a dev_t value from which you can extract both the major and minor device numbers.
oflag Flag bits specifying user mode options on the open() call.
sflag Flag bits specifying the type of STREAM open: driver, module or clone.
*crp Pointer to a cred_t object--an opaque structure for use in authentication.

The pfxopen() entry point is a public name. In addition a pointer to it must be defined in the qinit structure for the read queue.


Next | Prev | Up | Top | Contents | Index